package question.Solution1460;

import question.SolutionTemplate;

public class Solution1460 implements SolutionTemplate {

    public boolean canBeEqual(int[] target, int[] arr) {
        int[] tong1=new int[1001];
        int[] tong2=new int[1001];
        int len=target.length;
        for(int i=0;i<len;i++){
            tong1[target[i]]++;
            tong2[arr[i]]++;
        }
        for(int i=0;i<1001;i++)
        {
            if(tong1[i]!=tong2[i])return false;
        }
        return true;
    }

    @Override
    public void test() {

    }
}
